package com.qs.controller;


import com.qs.annotation.OperationLog;
import com.qs.response.Response;
import com.qs.service.IOrderItemService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单详情表 前端控制器
 * </p>
 *
 * @author author
 * @since 2023-12-07
 */
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/order/item")
@RequiredArgsConstructor
public class OrderItemController {

    private final IOrderItemService orderItemService;

    /**
     * 获取商品id
     * @param orderId
     * @param userId
     * @return
     */
    @GetMapping("/get/goodsId/{orderId}/{userId}")
    public Response getGoodsIds(@PathVariable("orderId") String orderId,
                              @PathVariable("userId") Integer userId) {
        log.info("获取商品id请求进来了------------");
        Map<String,Object> map = orderItemService.getGoodsIds(orderId, userId);
        return Response.success(map);
    }

}
